// routes/userRoutes.js
const express = require('express');
const router = express.Router();
const userController = require('../controllers/userController');

// 用户注册
router.post('/register', userController.register);

// 用户登录
router.post('/login', userController.login);

// 刷新Token (需要认证)
router.post('/refresh-token', userController.refreshToken);

// 获取当前用户信息 (需要认证)
router.get('/me', userController.me);
router.get('/roleMenu', userController.roleMenu);

module.exports = router;
module.exports = router;